import request from '@/utils/request'

// 查询产品规格列表
export function listProductScheme(query) {
  return request({
    url: '/TProductScheme/productScheme/list',
    method: 'get',
    params: query
  })
}

// 查询产品规格详细
export function getProductScheme(objId) {
  return request({
    url: '/TProductScheme/productScheme/' + objId,
    method: 'get'
  })
}

// 新增产品规格
export function addProductScheme(data) {
  return request({
    url: '/TProductScheme/productScheme',
    method: 'post',
    data: data
  })
}

// 修改产品规格
export function updateProductScheme(data) {
  return request({
    url: '/TProductScheme/productScheme',
    method: 'put',
    data: data
  })
}

// 删除产品规格
export function delProductScheme(objId) {
  return request({
    url: '/TProductScheme/productScheme/' + objId,
    method: 'delete'
  })
}

// 导出产品规格
export function exportProductScheme(query) {
  return request({
    url: '/TProductScheme/productScheme/export',
    method: 'get',
    params: query
  })
}
// 查询产品规格树形列表
export function listProductTree() {
  return request({
    url: '/productTypeInfo/info/treeselect',
    method: 'get'
  })
}


// 区域属性结构列表
export function getTree(query) {
  return request({
    url: '/area/areaInfo/area/treeselect',
    method: 'get',
    params: query
  })
}